package com.zch.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.zch.dao.PolicyMapper;
import com.zch.dao.model.Policy;
import com.zch.dao.model.PolicyExample;
import com.zch.daoEx.PolicyMapperEx;
import com.zch.daoEx.model.PolicyEx;

@Service
public class PolicyService {
	@Autowired
	private PolicyMapper policyMapper;
	@Autowired
    private PolicyMapperEx policyMapperEx;

	public int countByExample(PolicyExample example) {
		return this.policyMapper.countByExample(example);
	}

	public Policy selectByPrimaryKey(String id) {
		return this.policyMapper.selectByPrimaryKey(id);
	}

	public List<Policy> selectByExample(PolicyExample example) {
		return this.policyMapper.selectByExample(example);
	}

	public int deleteByPrimaryKey(String id) {
		return this.policyMapper.deleteByPrimaryKey(id);
	}

	public int updateByPrimaryKeySelective(Policy record) {
		return this.policyMapper.updateByPrimaryKeySelective(record);
	}

	public int updateByPrimaryKey(Policy record) {
		return this.policyMapper.updateByPrimaryKey(record);
	}

	public int deleteByExample(PolicyExample example) {
		return this.policyMapper.deleteByExample(example);
	}

	public int updateByExampleSelective(Policy record, PolicyExample example) {
		return this.policyMapper.updateByExampleSelective(record, example);
	}

	public int updateByExample(Policy record, PolicyExample example) {
		return this.policyMapper.updateByExample(record, example);
	}

	public int insert(Policy record) {
		return this.policyMapper.insert(record);
	}

	public int insertSelective(Policy record) {
		return this.policyMapper.insertSelective(record);
	}

    public PolicyEx selectAppDetail(Map<String, Object> map) {
        return this.policyMapperEx.selectAppDetail(map);
    }

    public List<PolicyEx> selectList(Map<String, Object> map) {
        return this.policyMapperEx.selectList(map);
    }

    public List<PolicyEx> selectMyList(Map<String, Object> map) {
        return this.policyMapperEx.selectMyList(map);
    }

    public int cancleTops(Map<String, Object> map) {
        return this.policyMapperEx.cancleTops(map);
    }

}
